/*function goToAnchor(anchor) {
	if (anchor != '' && anchor != "$anchor") {
		window.location.hash = anchor;
	}
}*/

function sendPrintRequest (formId, event, valueElement) {
	method = "post";
    // The rest of this code assumes you are not using a library.
    // It can be made less wordy if you use one.
    var form = document.getElementById(formId);
    form.setAttribute("method", method);
    form.setAttribute("action", "");

    var hiddenField = document.createElement("input");
    hiddenField.setAttribute("type", "hidden");
    hiddenField.setAttribute("name", "_eventId");
    hiddenField.setAttribute("value", event);
    form.appendChild(hiddenField);
    hiddenField = document.createElement("input");
    hiddenField.setAttribute("type", "hidden");
    hiddenField.setAttribute("name", "collectionId");
    hiddenField.setAttribute("value", valueElement);
    form.appendChild(hiddenField);
    form.submit();
}

/*function disableInput(listIds) {
	var arrayIds = listIds.split(";");
	
	for(var i=0; i < arrayIds.length; i++) {
		alert(arrayIds[i]);
		var input = document.getElementById(arrayIds[i]);
		if (input != null)
			input.disabled = "disabled";
	}
}*/

/*function show(str) {
	var mdiv = document.getElementById('divInfo');
	if (mdiv.innerHTML == "") {
		if (str == "collectionSpreadsheet") {
			mdiv.innerHTML = "<h4>More information</h4><p>The Collection Level spreadsheet is used to describe either QuDEx collections or sub-collections.</p>" +
				"<p>A QuDex Collection is a Fedora Object that contains metadata annotations to describe a Qualitative Study and also contains the QuDEx XML document describing all the documents and elements associated with this study. The XML instance is stored as a special data type within the object.</p>";
		} else if (str == "fileSpreadsheet") {
			mdiv.innerHTML = "<h4>More information</h4><p>The File Level spreadsheet is used to describe QuDEx documents associated to a particular Fedora QuDEx Collection (Elements created from a Collection Level Spreadsheet).</p>" +
				"<p>A QuDex File is represented in Fedora as a data Object which contains the following information:" +
				"<ul><li>Metadata describing the document</li><li>A reference to the original qualitative material that this object refers to.</li><li>Associated QuDEx categories, memos, codes.</li></ul></p>";
		}
	} else mdiv.innerHTML = "";
}

function popitup(url) {
	newwindow = window.open(url, 'name', 'height=400,width=450');
	if (window.focus) {
		newwindow.focus();
	}
	return false;
}*/
